package br.cs.correspodente.main;

import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.UnsupportedLookAndFeelException;

import br.cs.correspodente.janela.Janela_Principal;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Janela_Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
		Janela_Principal janela_Principal = new Janela_Principal();
		janela_Principal.setVisible(true);
	    janela_Principal.addWindowListener(new WindowAdapter() { 
	         public void windowClosing(WindowEvent evJanela) {
	    	   System.exit(0);
	         }
	    });
	}

}
